package com.zheng.mybatisx.controller;


import com.zheng.mybatisx.pojo.User;
import com.zheng.mybatisx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * <p>
 * User表 前端控制器
 * </p>
 *
 * @author Zheng
 * @since 2021-09-18
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/select")
    public ArrayList<User> select(){
        ArrayList<User> users = userService.selectByMyself();
        return users;
    }
}
